refactor(mypy): add stricter rules to specific modules [part I/VI]#969
Merged
refactor(mypy): add stricter rules to specific modules [part I/VI]#969
Conversation
43eb06d to
5916646
Compare
0bc534b to
27011cb
Compare
1 task
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #969 +/- ##
==========================================
+ Coverage 85.12% 85.15% +0.02%
==========================================
Files 294 294
Lines 22783 22789 +6
Branches 3430 3432 +2
==========================================
+ Hits 19395 19405 +10
+ Misses 2707 2703 -4
Partials 681 681 ☔ View full report in Codecov by Sentry. |
This was referenced Mar 19, 2024
msbrogli
previously approved these changes
Mar 19, 2024
5916646 to
6c494e6
Compare
27011cb to
0f107df
Compare
The base branch was changed.
0f107df to
0d3deb6
Compare
jansegre
approved these changes
Mar 19, 2024
msbrogli
approved these changes
Mar 19, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #967
Motivation
We currently use a subset of static typing rules with mypy, for historic reasons. The aim should be to enable
strict=Truein the whole repo, or at least most of it. One way to do this incrementally is to configure a mypy override with stricter rules and set it for some specific modules.This PR does this for some newer or important modules. We cannot use
strict=Truedirectly, because this rule is not available on per-module configs. Therefore, we get all strict rules from the mypy documentation and manually configure them.Acceptance Criteria
mypyandmypy-zope.Checklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged